package com.solve.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.solve.entity.ResourceInfoComment;
import com.solve.entity.base.BaseResponse;
import com.solve.service.impl.ResourceInfoCommentServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/resourceInfoComment")
public class ResourceInfoCommentController {
    @Resource
    private ResourceInfoCommentServiceImpl resourceInfoCommentService;

    @PostMapping("/saveResourceInfoComment")
    public BaseResponse saveResourceInfo(@RequestBody ResourceInfoComment resourceInfoComment){
        resourceInfoComment = resourceInfoCommentService.saveResourceInfoComment(resourceInfoComment);
        return new BaseResponse(true,"保存成功!",resourceInfoComment);
    }

    @PostMapping("/selectResourceInfoCommentList")
    public BaseResponse selectResourceInfoList(@RequestBody ResourceInfoComment resourceInfoComment){
        PageInfo pageInfo =  resourceInfoCommentService.selectResourceInfoCommentList(resourceInfoComment);
        return new BaseResponse(true,"保存成功!",pageInfo);
    }
}
